package handling.login.handler;

import client.MapleCharacterUtil;
import client.MapleClient;
import handling.login.LoginInformationProvider;
import org.apache.mina.core.session.IoSession;
import tools.data.LittleEndianAccessor;
import tools.packet.LoginPacket;

public class CheckCharNameHandler {

    public static void handlePacket(LittleEndianAccessor slea, MapleClient c) {
        String name = slea.readMapleAsciiString();
        c.getSession().write(LoginPacket.charNameResponse(name, (!MapleCharacterUtil.canCreateChar(name, c.isGm())) || ((LoginInformationProvider.getInstance().isForbiddenName(name)) && (!c.isGm()))));
    }

    public static void Chatk(LittleEndianAccessor slea, MapleClient c) {
        slea.skip(4);
    }
}

/* Location:           C:\Users\文炳\Desktop\CXFBY\114Maplewing.jar
 * Qualified Name:     handling.login.handler.CheckCharNameHandler
 * JD-Core Version:    0.6.2
 */